|
![](/i/fill.gif) |
Hi,
syntax like
#local size = big ? 100 : 50;
(from C "operator?" ) isnt working, and writting it normaly as:
#if (big) #local size=100; #else #local size=50; #end
is quite long (I like to keep my syntax short). So I wanted to write a tiny
IfElse function, like:
#macro IfElse(A,B,C) #if (A) 55 #else 30 #end #end
#local DD = IfElse(variant_Wide, 50, 100);
but it gaves a pares error.
I replaced it with good sytnax:
#macro IfElse(A,B,C) select(A-1,C,B,C) #end
that do work, but just for curiosity, how to make previous syntax work
also?
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
![](/i/fill.gif) |